<li class="nav-item dropdown listyle">
    <a class="nav-link dropdown-toggle fontstyle" href="#" role="button" data-toggle="dropdown" aria-expanded="false">
        项目  {% if request.tracer.project %}  ({{ request.tracer.project.name }}) {% endif %}
    </a>
    <div class="dropdown-menu">
        {% if my %}
            <h6 class="dropdown-item"><i class="fas fa-list"></i> 我创建的项目</h6>
            {% for item in my %}
                <a class="dropdown-item" href="{% url 'manage:dashboard' project_id=item.id %}">{{ item.name }}</a>
            {% endfor %}
        {% endif %}


        <div class="dropdown-divider"></div>
        {% if join %}
            <h6 class="dropdown-item"><i class="fa fa-handshake"></i> 我参与的项目</h6>
            {% for item in join %}
                <a class="dropdown-item"
                   href="{% url 'manage:dashboard' project_id=item.project.id %}">{{ item.project.name }}</a>
            {% endfor %}
        {% endif %}

        <div class="dropdown-divider"></div>
        <a class="dropdown-item" href="{% url 'project_list' %}">所有项目</a>
    </div>
</li>